<template>
    <div class="common-layout">
        <el-container>
        <el-header style="background-color: #545c64;">
            <h2>无人机制造</h2>
            <span style="float: right;"></span>
        </el-header>
        <el-container>
            <el-aside width="200px">
                <el-menu
                    active-text-color="#ffd04b"
                    background-color="#545c64"
                    class="el-menu-vertical-demo"
                    default-active="route.path"
                    text-color="#fff"
                    router
                >
                    <el-sub-menu index="1">
                        <template #title>
                            <el-icon><Grid /></el-icon>
                            <span>基础数据</span>
                        </template>

                        <el-menu-item-group>
                            <el-menu-item index="/Workshop">车场管理</el-menu-item>
                            <el-menu-item index="/Productionline">产线管理</el-menu-item>
                        </el-menu-item-group>
                    </el-sub-menu>

                    <el-sub-menu index="2">
                        <template #title>
                           <el-icon><Document /></el-icon>
                            <span>生产管理</span>
                        </template>

                        <el-menu-item-group>
                            <el-menu-item index="/GetProduction">工单管理</el-menu-item>
                        </el-menu-item-group>
                    </el-sub-menu>

                    <el-sub-menu index="3">
                        <template #title>
                            <el-icon><Document /></el-icon>
                            <span>仓库管理</span>
                        </template>

                        <el-menu-item-group>
                            <el-menu-item index="/Warehouse">仓库定义</el-menu-item>
                            <el-menu-item index="1-2">item two</el-menu-item>
                        </el-menu-item-group>
                    </el-sub-menu>

                    <el-sub-menu index="4">
                        <template #title>
                            <el-icon><Document /></el-icon>
                            <span>设备管理</span>
                        </template>

                        <el-menu-item-group>
                            <el-menu-item index="/GetDeviceTypeList">设备类型</el-menu-item>
                        </el-menu-item-group>
                    </el-sub-menu>
                </el-menu>
            </el-aside>
            <el-main>
                <RouterView/>
            </el-main>
        </el-container>
        </el-container>
    </div>
</template>



<script lang="ts" setup>
    import {
        Document,
        Menu as IconMenu,
        Location,
        Setting,
    } from '@element-plus/icons-vue'
    import { useRoute,RouterView } from 'vue-router';
    const route=useRoute();
</script>